import request from '@/utils/request';

// 查询apollo自动替换列表
export function listApolloAutoReplace(query) {
  return request({
    url: '/tool/apolloAutoReplace/list',
    method: 'get',
    params: query,
  });
}

// 查询apollo自动替换详细
export function getApolloAutoReplace(id) {
  return request({
    url: '/tool/apolloAutoReplace/' + id,
    method: 'get',
  });
}

// 新增apollo自动替换
export function addApolloAutoReplace(data) {
  return request({
    url: '/tool/apolloAutoReplace',
    method: 'post',
    data: data,
  });
}

// 修改apollo自动替换
export function updateApolloAutoReplace(data) {
  return request({
    url: '/tool/apolloAutoReplace',
    method: 'put',
    data: data,
  });
}

// 删除apollo自动替换
export function delApolloAutoReplace(id) {
  return request({
    url: '/tool/apolloAutoReplace/' + id,
    method: 'delete',
  });
}

//下载
export function getOssId(ossId) {
  return request({
    url: 'baseline/baselineInfo/getOssId/' + baselineId,
    method: 'get',
  });
}

// 重新替换 apollo 配置
export function replaceAgain(data) {
  return request({
    url: '/tool/apolloAutoReplace/toReplaceAgain',
    method: 'put',
    data: data,
  });
}
